package com.ykdl.member.kid.beans;

import java.io.Serializable;
import java.util.List;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

import net.wxxr.http.interfaces.IJsonParser;
/**
 * 我的优惠券在线列表解析bean
 * @author jiafeiyu
 *
 */
public class TiketOnLineBean implements Serializable,IJsonParser{

	
	
	
	/**
	 * {
		  "tickets": [
		    {
		      "status": 2,
		      "valid_end_time": 1440312313,
		      "coupon_id": 3,
		      "members_only": false,
		      "created_time": 1437720313,
		      "logo": {
		        "url": "http://imgs.ykdllmyr.com/fxs/2015/7/20/CDbaKw8Yq8XMtmhCdVnQ3J.jpeg",
		        "width": 1170,
		        "file_id": 100101872,
		        "height": 500
		      },
		      "coupon_type": 4,
		      "valid_note": "valid_note",
		      "scope_desc": "适用范围描述中文",
		      "note": "note",
		      "ticket_id": "0000006D55B1F404",
		      "coupon_num_2": null,
		      "coupon_num_1": 30,
		      "valid_begin_time": 1437633913
		    }
		  ],
		  "next_cursor": 1,
		  "total_number": 1,
		  "prev_cursor": 0
		}
	 */
	private static final long serialVersionUID = -7476324281770074836L;
	private List<OnLineCouponBean> tickets;
	private int next_cursor;
	private int total_number;
	private int prev_cursor;
	private String desc ;
	private String error ;
	

	
	
	public String getDesc() {
		return desc;
	}



	public void setDesc(String desc) {
		this.desc = desc;
	}



	public String getError() {
		return error;
	}



	public void setError(String error) {
		this.error = error;
	}



	public List<OnLineCouponBean> getTickets() {
		return tickets;
	}



	public void setTickets(List<OnLineCouponBean> tickets) {
		this.tickets = tickets;
	}



	public int getNext_cursor() {
		return next_cursor;
	}



	public void setNext_cursor(int next_cursor) {
		this.next_cursor = next_cursor;
	}



	public int getTotal_number() {
		return total_number;
	}



	public void setTotal_number(int total_number) {
		this.total_number = total_number;
	}



	public int getPrev_cursor() {
		return prev_cursor;
	}



	public void setPrev_cursor(int prev_cursor) {
		this.prev_cursor = prev_cursor;
	}



	@Override
	public IJsonParser parse(String json) throws Exception {
		Gson   gson = null;
		if(null != json){
			GsonBuilder b = new GsonBuilder();
			gson  = b.create();
			return gson.fromJson(json, TiketOnLineBean.class);
		}
		return null;
	}

}
